package com.guhus.ec.controller.om;

import com.guhus.ec.pojo.om.Member;
import com.guhus.ec.service.om.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class MemberController {
    @Autowired
    MemberService memberService;

    @ResponseBody
    @RequestMapping("/member/selectAllMembers")
    public String selectAllMembers() {
        List<Member> memberList = memberService.selectAllMembers();
        return memberList.toString();
    }
}
